--Minimal successor attribute
--Transfers the MU to the successor with the smallest attribute value.
/*The MU is transferred depending on an attribute of a successor.
If you replace "attribute" e.g. with "procTime"  the actual MU ist transferred.
to the successor with the smallest processing time.

Details of implementation: ?.numSucc is assigned to the variable countSucc and not admitted to the loop-header
to prevent a time-consuming summary of the path ?.numSucc from being executed after every loop-cycle.
*/
is
	countSucc: integer;
	i: integer;
	minVal: any;
	minSuccessor: integer;
do
	countSucc := ?.numSucc;

	if countSucc > 0 then
		minVal := ?.succ(1).attribute;
		minSuccessor := 1;
	else
		return;
	end;

	for i:=2 to countSucc loop
		if ?.succ(i).attribute < minVal then
			minVal := ?.succ(i).attribute;
			minSuccessor := i;
		end;
	next;

	@.move(minSuccessor);
end;
/*attribute:Attribute of the successor deciding to wich successor is transfered.
*/